<template>
  <div class="reportFormPage">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;1&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;3 </span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">普通混凝土配合比设计试验检测记录表</div>
        <div class="codeText">BGLQ05002F</div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <!-- .........................1111111111111111111111111111111......................................................... -->
      <div class="table-border">
        <table height="220px" class="top-table">
          <tbody>
            <tr>
              <td align="center" width="15%" height="25">
                <span>工程名称</span>
              </td>
              <td width="100%" colspan="3" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
            </tr>
            <tr>
              <td align="center" width="15%" height="25">
                <span>工程部位/用途</span>
              </td>
              <td width="100%" colspan="3" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="25" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>
                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <!--                <span>；来样时间：</span>-->
                <!--                <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>-->
              </td>
            </tr>
            <tr>
              <td height="25" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验检测日期</span>
              </td>
               <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>

              <td align="center" style="width: 15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td v-if="isPdf" width="35%">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
                ℃；湿度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span
                >%RH
              </td>
              <td v-else width="35%">
                温度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" class="height100" style="width: 15%" />℃；湿度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" class="height100" style="width: 15%" />%RH
              </td>
            </tr>
            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="660px" class="middle-table">
          <tbody>
            <tr trindex="0" height="40">
              <td width="10%" colspan="1" rowspan="4">
                设计
                <br />条件
              </td>
              <td width="15%" colspan="2">设计强度等级</td>
              <td width="25%" colspan="2">
                <el-input v-model="form.shejqddj" @blur="passValue()" @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'" />
              </td>
              <td width="15%" colspan="2">搅拌方式</td>
              <td width="35%" colspan="3">
                <!-- <el-input v-model="form.banzff" @keydown.native="handleKeyDown($event, 0, 1)" :ref="'0_1'" /> -->
                <el-select clearable v-model="form.banzff" class="hide-icon width100 height100" placeholder>
                  <el-option label="强制式" value="强制式"></el-option>
                  <el-option label="机械拌制" value="机械拌制"></el-option>
                  <el-option label="人工拌制" value="人工拌制"></el-option>
                </el-select>
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">设计坍落度(mm)</td>
              <td colspan="2">
                <el-input v-model="form.shejtld" @blur="passValue()" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'" />
              </td>
              <td colspan="2">成型方法</td>
              <td colspan="3">
                <!-- <el-input v-model="form.chengxff" @keydown.native="handleKeyDown($event, 1, 1)" :ref="'1_1'" /> -->
                <el-select clearable v-model="form.chengxff" class="hide-icon width100 height100" placeholder>
                  <el-option label="人工成型" value="人工成型"></el-option>
                  <el-option label="标准振动台成型" value="标准振动台成型"></el-option>
                  <el-option label="插入式振捣棒成型" value="插入式振捣棒成型"></el-option>
                </el-select>
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">标准差σ</td>
              <td colspan="2">
                <el-input v-model="form.biaozc" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'" />
              </td>
              <td colspan="2">养护方式</td>
              <td colspan="3">
                <!-- <el-input v-model="form.yanghfs" @keydown.native="handleKeyDown($event, 2, 1)" :ref="'2_1'" /> -->
                <el-select clearable v-model="form.yanghfs" class="hide-icon width100 height100" placeholder>
                  <el-option label="标准养护" value="标准养护"></el-option>
                  <el-option label="自然养护" value="自然养护"></el-option>
                  <el-option label="蒸汽养护" value="蒸汽养护"></el-option>
                </el-select>
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">试配强度(MPa)</td>
              <td colspan="2">
                <el-input v-model="form.shipqd" @blur="passValue()" @keydown.native="handleKeyDown($event, 3, 0)" :ref="'3_0'" />
              </td>
              <td colspan="2">养护环境</td>
              <td v-if="isPdf" colspan="3">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.yanghhjwd }}</span>
                ℃；相对湿度：
                <span style="display: inline-block; width: 10%">{{ form.yanghhjsd }}</span
                >%RH
              </td>
              <td v-else colspan="3">
                温度:
                <el-input type="text" v-model="form.yanghhjwd" style="border-width: 0px; width: 10%; text-align: left" @keydown.native="handleKeyDown($event, 3, 1)" :ref="'3_1'" />℃ 相对湿度:
                <el-input type="text" v-model="form.yanghhjsd" style="border-width: 0px; width: 10%; text-align: left" @keydown.native="handleKeyDown($event, 3, 2)" :ref="'3_2'" />%RH
              </td>
            </tr>

            <!--            材料说明-->

            <tr trindex="0" width="100%" height="40">
              <td width="10%" colspan="1" rowspan="13">
                材料
                <br />说明
              </td>
              <td width="20%" colspan="2">水泥强度等级</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.shuinqddj" @keydown.native="handleKeyDown($event, 4, 0)" :ref="'4_0'" />
              </td>
              <td width="20%" colspan="2">水泥产地</td>
              <td width="30%" colspan="3">
                <el-input v-model="form.shuincd" @keydown.native="handleKeyDown($event, 4, 1)" :ref="'4_1'" />
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td width="15%" colspan="1">粗集料产地</td>
              <td width="30%" colspan="3">
                <el-input v-model="form.cujlcd" @keydown.native="handleKeyDown($event, 5, 0)" :ref="'5_0'" />
              </td>
              <td width="25%" colspan="3">粗集料表观密度(kg/m³)</td>
              <td width="25%" colspan="2">
                <el-input v-model="form.cujlbgmd" @keydown.native="handleKeyDown($event, 5, 1)" :ref="'5_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td width="15%" colspan="1">规格种类</td>
              <td width="20%" colspan="2"><el-input v-model="form.guigzl1" @keydown.native="handleKeyDown($event, 6, 0)" :ref="'6_0'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.guigzl2" @keydown.native="handleKeyDown($event, 6, 1)" :ref="'6_1'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.guigzl3" @keydown.native="handleKeyDown($event, 6, 2)" :ref="'6_2'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.guigzl4" @keydown.native="handleKeyDown($event, 6, 3)" :ref="'6_3'" /></td>
            </tr>
            <tr trindex="1" height="40">
              <td width="15%" colspan="1">比例(%)</td>
              <td width="20%" colspan="2"><el-input v-model="form.bil1" @keydown.native="handleKeyDown($event, 7, 0)" :ref="'7_0'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.bil2" @keydown.native="handleKeyDown($event, 7, 1)" :ref="'7_1'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.bil3" @keydown.native="handleKeyDown($event, 7, 2)" :ref="'7_2'" /></td>
              <td width="20%" colspan="2"><el-input v-model="form.bil4" @keydown.native="handleKeyDown($event, 7, 3)" :ref="'7_3'" /></td>
            </tr>
            <tr trindex="1" height="40">
              <td width="20%" colspan="2">细集料产地</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.xijlcd" @keydown.native="handleKeyDown($event, 8, 0)" :ref="'8_0'" />
              </td>
              <td width="20%" colspan="2">细集料表观密度(kg/m³)</td>
              <td width="25%" colspan="3">
                <el-input v-model="form.xijlbgmd" @keydown.native="handleKeyDown($event, 8, 1)" :ref="'8_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">细度模数</td>
              <td colspan="2">
                <el-input v-model="form.xidms" @keydown.native="handleKeyDown($event, 9, 0)" :ref="'9_0'" />
              </td>
              <td colspan="2">细集料类型</td>
              <td colspan="3">
                <el-input v-model="form.xijllx" @keydown.native="handleKeyDown($event, 9, 1)" :ref="'9_1'" />
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td width="20%" colspan="2">粉煤灰名称</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.fenmhmc" @keydown.native="handleKeyDown($event, 10, 0)" :ref="'10_0'" />
              </td>
              <td width="20%" colspan="2">粉煤灰产地</td>
              <td width="25%" colspan="3">
                <el-input v-model="form.fenmhcd" @keydown.native="handleKeyDown($event, 10, 1)" :ref="'10_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">粉煤灰级别</td>
              <td colspan="2">
                <el-input v-model="form.fenmhjb" @keydown.native="handleKeyDown($event, 11, 0)" :ref="'11_0'" />
              </td>
              <td colspan="2">粉煤灰掺量(%)</td>
              <td colspan="3">
                <el-input v-model="form.fenmhcl" @keydown.native="handleKeyDown($event, 11, 1)" :ref="'11_1'" />
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td colspan="2">矿粉名称</td>
              <td colspan="7">
                <el-input v-model="form.kuangfmc" @keydown.native="handleKeyDown($event, 12, 0)" :ref="'12_0'" />
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td colspan="2">矿粉产地</td>
              <td colspan="2">
                <el-input v-model="form.kuangfcd" @keydown.native="handleKeyDown($event, 13, 0)" :ref="'13_0'" />
              </td>
              <td colspan="2">矿粉掺量(%)</td>
              <td colspan="3">
                <el-input v-model="form.kuangfcl" @keydown.native="handleKeyDown($event, 13, 1)" :ref="'13_1'" />
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td colspan="2">外掺剂名称</td>
              <td colspan="2">
                <el-input v-model="form.waicjmc1" @keydown.native="handleKeyDown($event, 14, 0)" :ref="'14_0'" />
              </td>
              <td colspan="2">掺量(%)</td>
              <td colspan="3">
                <el-input v-model="form.chanl1" @keydown.native="handleKeyDown($event, 14, 1)" :ref="'14_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">外掺剂名称</td>
              <td colspan="2">
                <el-input v-model="form.waicjmc2" @keydown.native="handleKeyDown($event, 15, 0)" :ref="'15_0'" />
              </td>
              <td colspan="2">掺量(%)</td>
              <td colspan="3">
                <el-input v-model="form.chanl2" @keydown.native="handleKeyDown($event, 15, 1)" :ref="'15_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">外掺剂名称</td>
              <td colspan="2">
                <el-input v-model="form.waicjmc3" @keydown.native="handleKeyDown($event, 16, 0)" :ref="'16_0'" />
              </td>
              <td colspan="2">掺量(%)</td>
              <td colspan="3">
                <el-input v-model="form.chanl3" @keydown.native="handleKeyDown($event, 16, 1)" :ref="'16_1'" />
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <!-- .................................333333333333333............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType" />
    <bs-judge-base-edit-view ref="bsJudgeBaseEditViewRef" @submit="selectJudgeBaseEdit" :syType="syType" />

    <!-- ............................................................................第二页................................................ -->
    <div class="report-dom mt20">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">第 2 页，共 3 页</div>
        </el-col>
      </el-row>
      <!-- <div class="threeTopBox"> -->
      <div style="text-align: right; font-family: '宋体'; font-size: 14px; margin-right: 60px">续上表</div>
      <!-- </div> -->
      <!-- .................................续上表............................................... -->
      <div class="table-border">
        <table height="930px" class="top-table">
          <tbody>
            <tr trindex="0" height="25">
              <td colspan="2">试验编号</td>
              <td colspan="3">1</td>
              <td colspan="3">2</td>
              <td colspan="3">3</td>
            </tr>
            <tr trindex="1">
              <td colspan="1" rowspan="13" class="td1">
                <div>计</div>
                <div>算</div>
                <div>配</div>
                <div>合</div>
                <div>比</div>
                <div>(kg/m³)</div>
              </td>
              <td height="25" class="td2">水胶比</td>
              <td colspan="3" class="td3">
                <el-input v-model="form.detailList[0].shuijb" @blur="passValueForm(1)" />
              </td>
              <td colspan="3" class="td3">
                <el-input v-model="form.detailList[1].shuijb" @blur="passValueForm(1)" />
              </td>
              <td colspan="3" class="td3">
                <el-input v-model="form.detailList[2].shuijb" @blur="passValueForm(1)" />
              </td>
            </tr>

            <tr>
              <td height="25">砂率(%)</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shal" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shal" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shal" @blur="passValueForm" />
              </td>
            </tr>
            <tr>
              <td height="25">水泥</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shuin" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shuin" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shuin" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">细集料</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].xijl" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].xijl" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].xijl" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">粗集料</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].cujl" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].cujl" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].cujl" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">水</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shui" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shui" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shui" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">
                <span v-if="isPdf">{{ form.yonglmc1 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc1" @blur="passValue" />
                <!--                <el-input v-model="form.yonglmc1" @blur="passValue"/>-->
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongl1" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongl1" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongl1" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">
                <span v-if="isPdf">{{ form.yonglmc2 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc2" @blur="passValue" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongl2" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongl2" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongl2" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">
                <span v-if="isPdf">{{ form.yonglmc3 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc3" @blur="passValue" />
                <!--                <el-input v-model="form.yonglmc3" @blur="passValue"/>-->
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongl3" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongl3" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongl3" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">
                <span v-if="isPdf">{{ form.yonglmc4 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc4" @blur="passValue" />
                <!--                <el-input v-model="form.yonglmc4" @blur="passValue"/>-->
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongl4" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongl4" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongl4" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">
                <span v-if="isPdf">{{ form.yonglmc5 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc5" @blur="passValue" />
                <!--                <el-input v-model="form.yonglmc5" @blur="passValue"/>-->
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongl5" @blur="computezlphb(0)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongl5" @blur="computezlphb(1)" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongl5" @blur="computezlphb(2)" />
              </td>
            </tr>
            <tr>
              <td height="25">理论容量</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].lilrz" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].lilrz" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].lilrz" @blur="passValueForm" />
              </td>
            </tr>
            <tr>
              <td height="25">重量配合比</td>
              <td colspan="3" class="td3">
                <div class="container">{{ form.detailList[0].zhonglphb }}</div>
              </td>
              <td colspan="3" class="td3">
                {{ form.detailList[1].zhonglphb }}
              </td>
              <td colspan="3" class="td3">
                {{ form.detailList[2].zhonglphb }}
              </td>
            </tr>

            <!--                 试拌    试拌         ---------------- -->

            <tr trindex="1">
              <td colspan="1" rowspan="9">
                <div>试</div>
                <div>拌</div>
                <el-input v-model="form.shibstyl" @change="handleStyl" style="height: 25px; width: 100%; margin: 4px 0" />
                <div>升</div>
                <div>砼</div>
                <div>用</div>
                <div>量</div>
                <div>(kg)</div>
              </td>
              <td height="25">水泥</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shuinl" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shuinl" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shuinl" disabled />
              </td>
            </tr>

            <tr>
              <td height="25">细集料</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].xijll" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].xijll" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].xijll" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">粗集料</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].cujll" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].cujll" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].cujll" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">水</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shuil" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shuil" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shuil" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">
                <!-- <span v-if="isPdf">{{ form.yonglmcl1 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmcl1" @blur="passValue" disabled /> -->
                <span v-if="isPdf">{{ form.yonglmc1 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc1" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongll1" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongll1" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongll1" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">
                <!-- <span v-if="isPdf">{{ form.yonglmcl2 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmcl2" @blur="passValue" disabled /> -->
                <span v-if="isPdf">{{ form.yonglmc2 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc2" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongll2" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongll2" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongll2" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">
                <!-- <span v-if="isPdf">{{ form.yonglmcl3 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmcl3" @blur="passValue" disabled /> -->
                <span v-if="isPdf">{{ form.yonglmc3 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc3" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongll3" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongll3" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongll3" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">
                <!-- <span v-if="isPdf">{{ form.yonglmcl4 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmcl4" @blur="passValue" disabled/> -->
                <span v-if="isPdf">{{ form.yonglmc4 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc4" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongll4" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongll4" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongll4" disabled />
              </td>
            </tr>
            <tr>
              <td height="25">
                <!-- <span v-if="isPdf">{{ form.yonglmcl5 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmcl5" @blur="passValue" disabled /> -->
                <span v-if="isPdf">{{ form.yonglmc5 }}</span>
                <el-input v-else type="textarea" v-model="form.yonglmc5" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].yongll5" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].yongll5" disabled />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].yongll5" disabled />
              </td>
            </tr>

            <tr>
              <td height="25" colspan="2">实测容重(kg/m³)</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shicrz" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shicrz" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shicrz" @blur="passValueForm" />
              </td>
            </tr>
            <tr>
              <td height="25" colspan="2">实测坍落度(mm)</td>
              <td colspan="3">
                <el-input v-model="form.detailList[0].shictld" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[1].shictld" @blur="passValueForm" />
              </td>
              <td colspan="3">
                <el-input v-model="form.detailList[2].shictld" @blur="passValueForm" />
              </td>
            </tr>

            <tr>
              <td height="25" colspan="2">成型日期</td>
              <td colspan="3">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[0].chengxrq" @change="computeShiyrq(0)" />
              </td>
              <td colspan="3">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[1].chengxrq" @change="computeShiyrq(1)" />
              </td>
              <td colspan="3">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[2].chengxrq" @change="computeShiyrq(2)" />
              </td>
            </tr>

            <tr>
              <td height="25" colspan="2">试件尺寸(mm)</td>
              <td colspan="3">
                <el-select clearable v-model="form.detailList[0].shijcc" @change="shijccChange(0)" class="hide-icon width100 height100">
                  <el-option v-for="item in chiclist" :key="item.value" :label="item.label" :value="item.value"></el-option>
                </el-select>
              </td>
              <td colspan="3">
                <el-select clearable v-model="form.detailList[1].shijcc" @change="shijccChange(1)" class="hide-icon width100 height100">
                  <el-option v-for="item in chiclist" :key="item.value" :label="item.label" :value="item.value"></el-option>
                </el-select>
              </td>
              <td colspan="3">
                <el-select clearable v-model="form.detailList[2].shijcc" @change="shijccChange(2)" class="hide-icon width100 height100">
                  <el-option v-for="item in chiclist" :key="item.value" :label="item.label" :value="item.value"></el-option>
                </el-select>
              </td>
            </tr>
            <!--            7天强度   28天强度-->
            <tr>
              <td class="td1" rowspan="4">7天强度</td>
              <td height="25" class="td2">试验日期</td>
              <td colspan="3" class="td3">
                <span>{{ form.detailList[0].shiyrq7q }}</span>
              </td>
              <td colspan="3" class="td3">
                <span>{{ form.detailList[1].shiyrq7q }}</span>
              </td>
              <td colspan="3" class="td3">
                <span>{{ form.detailList[2].shiyrq7q }}</span>
              </td>
            </tr>
            <tr>
              <td height="25">荷载(kN)</td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[0].qhzq1" @blur="computeqd(0, 1)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[0].qhzq2" @blur="computeqd(0, 2)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[0].qhzq3" @blur="computeqd(0, 3)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[1].qhzq1" @blur="computeqd(1, 1)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[1].qhzq2" @blur="computeqd(1, 2)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[1].qhzq3" @blur="computeqd(1, 3)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[2].qhzq1" @blur="computeqd(2, 1)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[2].qhzq2" @blur="computeqd(2, 2)" />
              </td>
              <td colspan="1" class="td3-3">
                <el-input v-model="form.detailList[2].qhzq3" @blur="computeqd(2, 3)" />
              </td>
            </tr>
            <tr>
              <td height="25">强度(MPa)</td>
              <td colspan="1">
                {{ form.detailList[0].qqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[0].qqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[0].qqdq3 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].qqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].qqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].qqdq3 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].qqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].qqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].qqdq3 }}
              </td>
            </tr>
            <tr>
              <td height="25">结果(MPa)</td>
              <td colspan="3">
                {{ form.detailList[0].qpjqdq1 }}
              </td>
              <td colspan="3">
                {{ form.detailList[1].qpjqdq1 }}
              </td>
              <td colspan="3">
                {{ form.detailList[2].qpjqdq1 }}
              </td>
            </tr>

            <tr>
              <td rowspan="4">28天强度</td>
              <td height="25">试验日期</td>
              <td colspan="3">
                <span>{{ form.detailList[0].shiyrq28q }}</span>
              </td>
              <td colspan="3">
                <span>{{ form.detailList[1].shiyrq28q }}</span>
              </td>
              <td colspan="3">
                <span>{{ form.detailList[2].shiyrq28q }}</span>
              </td>
            </tr>
            <tr>
              <td height="25">荷载(kN)</td>
              <td colspan="1">
                <el-input v-model="form.detailList[0].ehzq1" @blur="computeqd28(0, 1)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[0].ehzq2" @blur="computeqd28(0, 2)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[0].ehzq3" @blur="computeqd28(0, 3)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[1].ehzq1" @blur="computeqd28(1, 1)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[1].ehzq2" @blur="computeqd28(1, 2)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[1].ehzq3" @blur="computeqd28(1, 3)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[2].ehzq1" @blur="computeqd28(2, 1)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[2].ehzq2" @blur="computeqd28(2, 2)" />
              </td>
              <td colspan="1">
                <el-input v-model="form.detailList[2].ehzq3" @blur="computeqd28(2, 3)" />
              </td>
            </tr>
            <tr>
              <td height="25">强度(MPa)</td>
              <td colspan="1">
                {{ form.detailList[0].eqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[0].eqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[0].eqdq3 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].eqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].eqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[1].eqdq3 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].eqdq1 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].eqdq2 }}
              </td>
              <td colspan="1">
                {{ form.detailList[2].eqdq3 }}
              </td>
            </tr>
            <tr>
              <td height="25">结果(MPa)</td>
              <td colspan="3">
                {{ form.detailList[0].epjqdq1 }}
              </td>
              <td colspan="3">
                {{ form.detailList[1].epjqdq1 }}
              </td>
              <td colspan="3">
                {{ form.detailList[2].epjqdq1 }}
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <!-- .........................................................................第三页........................................................ -->
    <div class="report-dom mt20">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">第 3 页，共 3 页</div>
        </el-col>
      </el-row>
      <!-- <div class="threeTopBox"> -->
      <div style="text-align: right; font-family: '宋体'; font-size: 14px; margin-right: 60px">续上表</div>
      <!-- </div> -->
      <!-- .................................续上表............................................... -->

      <div class="table-border">
        <table height="870px" class="top-table">
          <tbody>
            <tr trindex="0">
              <td colspan="12">验证配合比强度</td>
            </tr>
            <!--3天-->
            <tr trindex="0">
              <td colspan="2" width="15%" rowspan="4">3天强度</td>
              <td colspan="1">试验日期</td>
              <td colspan="9">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[0].shiyrq3" @change="passValue" />
              </td>
            </tr>
            <tr>
              <td>荷载(kN)</td>
              <td colspan="3"><el-input v-model="form.detailList[0].shz1" @blur="compute3qd(0)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[1].shz1" @blur="compute3qd(1)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[2].shz1" @blur="compute3qd(2)" /></td>
            </tr>
            <tr>
              <td>强度(MPa)</td>
              <td colspan="3">{{ form.detailList[0].sqd1 }}</td>
              <td colspan="3">{{ form.detailList[1].sqd1 }}</td>
              <td colspan="3">{{ form.detailList[2].sqd1 }}</td>
            </tr>
            <tr>
              <td>结果(MPa)</td>
              <td colspan="9">{{ form.detailList[0].spjqd1 }}</td>
            </tr>

            <!--            7天-->
            <tr trindex="0">
              <td colspan="2" rowspan="4">7天强度</td>
              <td colspan="1">试验日期</td>
              <td colspan="9">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[0].shiyrq7" @change="passValue" />
              </td>
            </tr>
            <tr>
              <td>荷载(kN)</td>
              <td colspan="3"><el-input v-model="form.detailList[0].qhz1" @blur="compute7qd(0)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[1].qhz1" @blur="compute7qd(1)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[2].qhz1" @blur="compute7qd(2)" /></td>
            </tr>
            <tr>
              <td>强度(MPa)</td>
              <td colspan="3">{{ form.detailList[0].qqd1 }}</td>
              <td colspan="3">{{ form.detailList[1].qqd1 }}</td>
              <td colspan="3">{{ form.detailList[2].qqd1 }}</td>
            </tr>
            <tr>
              <td>结果(MPa)</td>
              <td colspan="9">{{ form.detailList[0].qpjqd1 }}</td>
            </tr>

            <!--            28天-->
            <tr trindex="0">
              <td colspan="2" rowspan="4">28天强度</td>
              <td colspan="1">试验日期</td>
              <td colspan="9">
                <el-date-picker class="syrqStyle hide-icon width100" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="form.detailList[0].shiyrq28" @change="passValue" />
              </td>
            </tr>
            <tr>
              <td>荷载(kN)</td>
              <td colspan="3"><el-input v-model="form.detailList[0].ehz1" @blur="compute28qd(0)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[1].ehz1" @blur="compute28qd(1)" /></td>
              <td colspan="3"><el-input v-model="form.detailList[2].ehz1" @blur="compute28qd(2)" /></td>
            </tr>
            <tr>
              <td>强度(MPa)</td>
              <td colspan="3">{{ form.detailList[0].eqd1 }}</td>
              <td colspan="3">{{ form.detailList[1].eqd1 }}</td>
              <td colspan="3">{{ form.detailList[2].eqd1 }}</td>
            </tr>
            <tr>
              <td>结果(MPa)</td>
              <td colspan="9">{{ form.detailList[0].epjqd1 }}</td>
            </tr>
          </tbody>
        </table>
        <table height="80px" class="bottom-table">
          <tr>
            <td style="border-top-width: 1px">
              <el-input type="textarea" :rows="2" v-model="fjsm" />
            </td>
          </tr>
        </table>
      </div>
      <!-- ...............................续上表..333333333333333............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>

<script>
import { getSnhntPhbsjsyjcjlBsInfo, computeKgNums } from "@/api/reportsnhnt/snhntPhbsjsyjcjlBsInfo";

import decimal from "@/utils/big-decimal";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import Bus from "@/utils/bus";
import { emptyConvert, handleFocus, handleKeyDown } from "@/views/reportForms/utils";
import { computeBiQualification } from "@/api/sycs/biQualification";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView";
import BsJudgeBaseEditView from "@/views/sycs/bsJudgeBase/BsJudgeBaseEditView";

export default {
  name: "bhw",
  components: {
    BsInstrumentView,
    BsJiancyjView,
    BsJudgeBaseView,
    BsJudgeBaseEditView
  },
  data() {
    return {
      formatText: "HH:mm",
      jiassj1: undefined,
      jiassj2: undefined,
      ningjsj1: undefined,
      ningjsj2: undefined,
      ningjsjpj: undefined,
      jilbh: "",
      chiclist: [
        { label: "100x100x100", value: "100x100x100" },
        { label: "150x150x150", value: "150x150x150" },
        { label: "200x200x200", value: "200x200x200" }
      ],
      form: {
        detailList: [
          {
            sqd1: "",
            shz1: "",
            shz2: "",
            sqd2: "",
            shz3: "",
            sqd3: "",
            eqd1: "",
            ehz1: "",
            ehz2: "",
            eqd2: "",
            ehz3: "",
            eqd3: "",
            qqd1: "",
            qhz1: "",
            qhz2: "",
            qqd2: "",
            qhz3: "",
            qqd3: "",
            shuijb: ""
          },
          {
            sqd1: "",
            shz1: "",
            shz2: "",
            sqd2: "",
            shz3: "",
            sqd3: "",
            eqd1: "",
            ehz1: "",
            ehz2: "",
            eqd2: "",
            ehz3: "",
            eqd3: "",
            qqd1: "",
            qhz1: "",
            qhz2: "",
            qqd2: "",
            qhz3: "",
            qqd3: "",
            shuijb: ""
          },
          {
            sqd1: "",
            shz1: "",
            shz2: "",
            sqd2: "",
            shz3: "",
            sqd3: "",
            eqd1: "",
            ehz1: "",
            ehz2: "",
            eqd2: "",
            ehz3: "",
            eqd3: "",
            qqd1: "",
            qhz1: "",
            qhz2: "",
            qqd2: "",
            qhz3: "",
            qqd3: "",
            shuijb: ""
          }
        ],
        shiyrq: "2024年03月09日",
        gongcbwyt: "",
        baogbh: "",
        jiancdwmc: "山东路桥集团试验检测中心有限公司泰安高速公路施工总承包项目工地试验室",
        totalPage: "",
        page: "",
        jiancyj: "",
        zhuyyqsbmcjbh: "",
        gongcmc: "汾阳至石楼高速公路",
        yangpmc: "K39+820-K40+440原地面",
        yangpbh: "JTG/T 3610-2019",
        laiysj: "2022年03月09日",
        yangpsl: "3kg",
        yangpzt: "完好无损"
      },
      fjsm: "附加声明：",
      dateText: "2024年05月10日",
      readonly: false
    };
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    syType: {
      type: [String, Number],
      default: () => ""
    }
  },
  watch: {},
  created() {
    this.getInfo();
  },
  methods: {
    //计算重量配合比
    computezlphb(i) {
      for (let i = 0; i < 3; i++) {
        let item = this.form.detailList[i];
        if (item.shuin && item.juqsxgxnjsj && item.xijl && item.cujl && item.shui) {
          //细灰比
          let xihb = decimal.divide(item.xijl, item.shuin);
          //粗灰比
          let cuhb = decimal.divide(item.cujl, item.shuin);
          //水灰比
          let shuihb = decimal.divide(item.shui, item.shuin);
          // item.zhonglphb = "1:1.00:" + xihb + ":" + cuhb + ":" + shuihb;
          item.zhonglphb = "1:" + xihb + ":" + cuhb + ":" + shuihb;
          // 用料1：水泥
          if (item.yongl1) {
            let yongl1 = decimal.divide(item.yongl1, item.shuin, 3);
            item.zhonglphb = item.zhonglphb + ":" + yongl1;
          }
          if (item.yongl2) {
            let yongl2 = decimal.divide(item.yongl2, item.shuin, 3);
            item.zhonglphb = item.zhonglphb + ":" + yongl2;
          }
          if (item.yongl3) {
            let yongl3 = decimal.divide(item.yongl3, item.shuin, 3);
            item.zhonglphb = item.zhonglphb + ":" + yongl3;
          }
          if (item.yongl4) {
            let yongl4 = decimal.divide(item.yongl4, item.shuin, 3);
            item.zhonglphb = item.zhonglphb + ":" + yongl4;
          }
          if (item.yongl5) {
            let yongl5 = decimal.divide(item.yongl5, item.shuin, 3);
            item.zhonglphb = item.zhonglphb + ":" + yongl5;
          }
        } else {
          item.zhonglphb = null;
        }
      }

      this.passValueForm();
      // 调接口计算下半部分
      this.getStyl();
    },
    handleStyl(val) {
      this.getStyl();
    },
    getStyl() {
      let params = [{}, {}, {}];
      for (let i = 0; i < 3; i++) {
        let item = this.form.detailList[i];
        // params[i].phb = item.zhonglphb?.length ? item.zhonglphb?.split(":") : [];
        params[i].phb = [
          this.form.detailList[i].shuin || 0,
          this.form.detailList[i].xijl || 0,
          this.form.detailList[i].cujl || 0,
          this.form.detailList[i].shui || 0,
          this.form.detailList[i].yongl1 || 0,
          this.form.detailList[i].yongl2 || 0,
          this.form.detailList[i].yongl3 || 0,
          this.form.detailList[i].yongl4 || 0,
          this.form.detailList[i].yongl5 || 0
        ];
        params[i].sum = this.form.shibstyl;
        params[i].zhuanHuanLv = 2.4;
      }
      const data = JSON.parse(JSON.stringify(params));
      computeKgNums(data).then((res) => {
        if (res.data?.length) {
          for (let a = 0; a < 3; a++) {
            let item = res.data[a].computeResult;
            for (let b = 0; b < item.length; b++) {
              this.form.detailList[a].shuinl = item[0] == 0 ? "-" : item[0] || null;
              this.form.detailList[a].xijll = item[1] == 0 ? "-" : item[1] || null;
              this.form.detailList[a].cujll = item[2] == 0 ? "-" : item[2] || null;
              this.form.detailList[a].shuil = item[3] == 0 ? "-" : item[3] || null;
              this.form.detailList[a].yongll1 = item[4] == 0 ? "-" : item[4] || null;
              this.form.detailList[a].yongll2 = item[5] == 0 ? "-" : item[5] || null;
              this.form.detailList[a].yongll3 = item[6] == 0 ? "-" : item[6] || null;
              this.form.detailList[a].yongll4 = item[7] == 0 ? "-" : item[7] || null;
              this.form.detailList[a].yongll5 = item[8] == 0 ? "-" : item[8] || null;
            }
          }
        }
      });
    },
    passValue() {
      //试验室配合比名称
      this.form.peihbmc = "胶凝材料：水泥：细集料：粗集料：水";
      if (this.form.yonglmc1) {
        this.form.peihbmc += "：" + this.form.yonglmc1;
      }
      if (this.form.yonglmc2) {
        this.form.peihbmc += "：" + this.form.yonglmc2;
      }
      if (this.form.yonglmc3) {
        this.form.peihbmc += "：" + this.form.yonglmc3;
      }
      if (this.form.yonglmc4) {
        this.form.peihbmc += "：" + this.form.yonglmc4;
      }
      if (this.form.yonglmc5) {
        this.form.peihbmc += "：" + this.form.yonglmc5;
      }
      Bus.$emit("setSnhntphbform", this.form);
    },
    //计算7天、28天试验日期
    computeShiyrq(i) {
      //计算7tian试验日期；
      if (this.form.detailList[i].chengxrq) {
        let cxrq = new Date(this.form.detailList[i].chengxrq);
        cxrq.setDate(cxrq.getDate() + 7);
        let year = cxrq.getFullYear();
        let month = cxrq.getMonth() + 1; // 获取月份，需要+1因为从0开始计数
        let day = cxrq.getDate(); // 获取日
        this.form.detailList[i].shiyrq7q = `${year}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}`;
      } else {
        this.form.detailList[i].shiyrq7q = undefined;
      }
      //计算28天试验日期
      if (this.form.detailList[i].chengxrq) {
        let cxrq = new Date(this.form.detailList[i].chengxrq);
        cxrq.setDate(cxrq.getDate() + 28);
        let year = cxrq.getFullYear();
        let month = cxrq.getMonth() + 1; // 获取月份，需要+1因为从0开始计数
        let day = cxrq.getDate(); // 获取日
        this.form.detailList[i].shiyrq28q = `${year}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}`;
      } else {
        this.form.detailList[i].shiyrq28q = undefined;
      }
      this.passValueForm();
    },
    // 传值给报告页面；
    passValueForm() {
      Bus.$emit("setSnhntphbData", this.form.detailList);
    },
    // 计算3天压强
    compute3qd(i) {
      let item = this.form.detailList[i],
        area = this.getarea(item.shijcc);
      if (item.shz1) {
        item.sqd1 = decimal.divide(item.shz1, area, 1);
      } else {
        item.sqd1 = null;
      }
      //计算平均压强
      if (this.form.detailList[0].sqd1 && this.form.detailList[1].sqd1 && this.form.detailList[2].sqd1) {
        this.form.detailList[0].spjqd1 = decimal.divide(decimal.add(decimal.add(this.form.detailList[0].sqd1, this.form.detailList[1].sqd1, 9), this.form.detailList[2].sqd1, 9), 3, 1);
      } else {
        this.form.detailList[0].spjqd1 = null;
      }
    },
    // 计算7天压强
    compute7qd(i) {
      let item = this.form.detailList[i],
        area = this.getarea(item.shijcc);
      if (item.qhz1) {
        item.qqd1 = decimal.divide(item.qhz1, area, 1);
      } else {
        item.qqd1 = null;
      }
      //计算平均压强
      if (this.form.detailList[0].qqd1 && this.form.detailList[1].qqd1 && this.form.detailList[2].qqd1) {
        this.form.detailList[0].qpjqd1 = decimal.divide(decimal.add(decimal.add(this.form.detailList[0].qqd1, this.form.detailList[1].qqd1, 9), this.form.detailList[2].qqd1, 9), 3, 1);
      } else {
        this.form.detailList[0].qpjqd1 = null;
      }
    },
    // 计算28天压强
    compute28qd(i) {
      let item = this.form.detailList[i],
        area = this.getarea(item.shijcc);
      if (item.ehz1) {
        item.eqd1 = decimal.divide(item.ehz1, area, 1);
      } else {
        item.eqd1 = null;
      }
      //计算平均压强
      if (this.form.detailList[0].eqd1 && this.form.detailList[1].eqd1 && this.form.detailList[2].eqd1) {
        this.form.detailList[0].epjqd1 = decimal.divide(decimal.add(decimal.add(this.form.detailList[0].eqd1, this.form.detailList[1].eqd1, 9), this.form.detailList[2].eqd1, 9), 3, 1);
      } else {
        this.form.detailList[0].epjqd1 = null;
      }
    },
    //计算7天强度
    computeqd(a, b) {
      // qhzq1,qqdq1,qpjqdq1
      let item = this.form.detailList[a],
        shijcc = this.getarea(item.shijcc);
      if (item["qhzq" + b]) {
        item["qqdq" + b] = decimal.divide(item["qhzq" + b], shijcc, 1);
      } else {
        item["qqdq" + b] = null;
      }
      //计算平均压强
      if (item.qqdq1 && item.qqdq2 && item.qqdq3) {
        item.qpjqdq1 = decimal.divide(decimal.add(decimal.add(item.qqdq1, item.qqdq2), item.qqdq3, 9), 3, 1);
      } else {
        item.qpjqdq1 = null;
      }
      this.passValueForm();
    },
    //计算28天强度
    computeqd28(a, b) {
      // ehzq1,eqdq1,epjqdq1
      let item = this.form.detailList[a],
        shijcc = this.getarea(item.shijcc);
      if (item["ehzq" + b]) {
        item["eqdq" + b] = decimal.divide(item["ehzq" + b], shijcc, 1);
      } else {
        item["eqdq" + b] = null;
      }
      //计算平均压强
      if (item.eqdq1 && item.eqdq2 && item.eqdq3) {
        item.epjqdq1 = decimal.divide(decimal.add(decimal.add(item.eqdq1, item.eqdq2), item.eqdq3, 9), 3, 1);
      } else {
        item.epjqdq1 = null;
      }
      this.passValueForm();
    },

    //试件尺寸改变，计算压强
    shijccChange(index) {
      let item = this.form.detailList[index];
      let shijcc = this.getarea(item.shijcc);
      for (let i = 0; i < 3; i++) {
        //7天压强
        if (item.shijcc && item["qhzq" + (i + 1)]) {
          item["qqdq" + (i + 1)] = decimal.divide(item["qhzq" + (i + 1)], shijcc, 1);
        } else {
          item["qqdq" + (i + 1)] = null;
        }
        //28天压强
        if (item.shijcc && item["ehzq" + (i + 1)]) {
          item["eqdq" + (i + 1)] = decimal.divide(item["ehzq" + (i + 1)], shijcc, 1);
        } else {
          item["eqdq" + (i + 1)] = null;
        }
      }
      //计算7天平均压强
      if (item.qqdq1 && item.qqdq2 && item.qqdq3) {
        item.qpjqdq1 = decimal.divide(decimal.add(decimal.add(item.qqdq1, item.qqdq2), item.qqdq3, 9), 3, 1);
      } else {
        item.qpjqdq1 = null;
      }
      //28天平均压强
      if (item.eqdq1 && item.eqdq2 && item.eqdq3) {
        item.epjqdq1 = decimal.divide(decimal.add(decimal.add(item.eqdq1, item.eqdq2), item.eqdq3, 9), 3, 1);
      } else {
        item.epjqdq1 = null;
      }
      this.passValueForm();
    },

    //计算面积（换算系数）
    getarea(item) {
      if (item == "150x150x150") {
        return 22.5;
      } else if (item == "100x100x100") {
        return decimal.divide(10, 0.95, 9);
      } else if (item == "200x200x200") {
        return decimal.divide(40, 1.05, 9);
      }
    },

    // 获取详情
    getInfo() {
      // if (!this.excelId) {
      //   return;
      // }
      getSnhntPhbsjsyjcjlBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
        this.form = response.data;
      });
    },

    submitForm() {
      return this.form;
    },

    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
      if (!info || !info.label) {
        return;
      }
      if (!this.form.pandyj) {
        this.form.pandyj = info.label;
      } else {
        if (info && info.label) {
          this.form.pandyj += "、" + info.label;
        }
      }
      // 添加指标 info.list
      let keys = [];
      info.list.forEach((item) => {
       if (this.form.baDetailVos[item.refQualId] && this.form.baDetailVos[item.refQualId].jiancjg) {
          this.form.baDetailVos[item.refQualId].symbolValue = item.symbolValue;
          this.form.baDetailVos[item.refQualId].num1 = item.num1;
          this.form.baDetailVos[item.refQualId].num2 = item.num2;
          keys.push(item.refQualId);
        }
      });
      this.computeDetectionResult(keys);
    },
    // 计算检测结果
    computeDetectionResult(keys) {
      if (!keys || keys.length <= 0) {
        return;
      }
      const data = keys.map((key) => {
        const info = {
          ...this.form.baDetailVos[key],
          jiancjg: this.form.baDetailVos[key].jiancjg == "-" ? "" : this.form.baDetailVos[key].jiancjg
        };
        return info;
      });
      computeBiQualification(data).then((res) => {
        const returnData = res.data;
        returnData.forEach((item) => {
          if (!item.symbolValue && !item.num1 && !item.num2) {
            item.jiszb = "-";
          }
          item.jiancjg = item.jiancjg ? item.jiancjg : "-";
          this.form.baDetailVos[item.qualId] = item;
        });
      });
    },
    // 编辑单个技术指标后赋值
    selectJudgeBaseEdit(info) {
      if (info.qualId) {
        this.form.baDetailVos[info.qualId] = info;
      }
      this.computeDetectionResult([info.qualId]);
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      // this.$set(this.form, 'jiancyj', info.label);
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setSnhntphbBgjcyj", { jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds });
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setSnhntphbBgZhuyyqsbmcjbh", { zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds });
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    //贯入阻力
    handlegrzl1(e) {
      if (e.cezjmj1 && e.guanryl1) {
        e.danwmjgrzl1 = decimal.divide(e.guanryl1, e.cezjmj1);
      } else {
        e.danwmjgrzl1 = undefined;
      }
      return e.danwmjgrzl1;
    },
    handlegrzl2(e) {
      if (e.cezjmj2 && e.guanryl2) {
        e.danwmjgrzl2 = decimal.divide(e.guanryl2, e.cezjmj2);
      } else {
        e.danwmjgrzl2 = undefined;
      }
      return e.danwmjgrzl2;
    },
    handlenjsjpj() {
      if (this.ningjsj1 && this.ningjsj2) {
        this.ningjsjpj = (parseInt(this.ningjsj1) + parseInt(this.ningjsj2)) / 2;
      } else {
        this.ningjsjpj = undefined;
      }
      return this.ningjsjpj;
    },

    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    },
    handleKeyDown(event, rowIndex, colIndex) {
      const maxArr = [0, 0, 0, 2, 1, 1, 3, 3, 1, 1, 1, 1, 0, 1, 1, 1, 1];
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    }
  }
};
</script>

<style scoped lang="scss">
.mt20 {
  margin-top: 20px !important;
}
.td1 {
  width: 8%;
}
.td2 {
  //width: 17%;
}
.td3 {
  width: 165px;
}
.td3-3 {
  width: 55px;
}
.container {
  width: 160px;
  display: inline-block;
  margin: 0 auto;
  text-align: center;
  word-wrap: break-word; /* 允许在单词内换行 */
  overflow-wrap: break-word; /* 同上，现代浏览器推荐使用这个属性别名 */
  white-space: normal; /* 允许换行 */
}
</style>
